29 research outputs found

    Tracing monadic computations and representing effects

    Full text link
    In functional programming, monads are supposed to encapsulate computations, effectfully producing the final result, but keeping to themselves the means of acquiring it. For various reasons, we sometimes want to reveal the internals of a computation. To make that possible, in this paper we introduce monad transformers that add the ability to automatically accumulate observations about the course of execution as an effect. We discover that if we treat the resulting trace as the actual result of the computation, we can find new functionality in existing monads, notably when working with non-terminating computations.Comment: In Proceedings MSFP 2012, arXiv:1202.240

    Tabling with Sound Answer Subsumption

    Get PDF
    Tabling is a powerful resolution mechanism for logic programs that captures their least fixed point semantics more faithfully than plain Prolog. In many tabling applications, we are not interested in the set of all answers to a goal, but only require an aggregation of those answers. Several works have studied efficient techniques, such as lattice-based answer subsumption and mode-directed tabling, to do so for various forms of aggregation. While much attention has been paid to expressivity and efficient implementation of the different approaches, soundness has not been considered. This paper shows that the different implementations indeed fail to produce least fixed points for some programs. As a remedy, we provide a formal framework that generalises the existing approaches and we establish a soundness criterion that explains for which programs the approach is sound. This article is under consideration for acceptance in TPLP.Comment: Paper presented at the 32nd International Conference on Logic Programming (ICLP 2016), New York City, USA, 16-21 October 2016, 15 pages, LaTeX, 0 PDF figure

    High-level effect handlers in C++

    Get PDF

    Degrading lists

    Get PDF
    Post-print (lokagerð höfundar)We discuss the relationship between monads and their known generalisation, graded monads, which are especially useful for modelling computational effects equipped with a form of sequential composition. Specifically, we ask if a graded monad can be extended to a monad, and when such a degrading is in some sense canonical. Our particular examples are the graded monads of lists and non-empty lists indexed by their lengths, which gives us a pretext to study the space of all (non-graded) monad structures on the list and non-empty list endofunctors. We show that, in both cases, there exist infinitely many monad structures. However, while there are at least two ways to complete the graded monad structure on length-indexed lists to a monad structure on the list endofunctor, such a completion for non-empty lists is unique.This research was supported by the Icelandic Research Fund project grant no. 196323-052. T.U. was also supported by the Estonian Ministry of Education and Research institutional research grant no. IUT33-13.Peer reviewed (ritrýnd grein

    Effects for Efficiency: Asymptotic Speedup with First-Class Control

    Get PDF
    We study the fundamental efficiency of delimited control. Specifically, we show that effect handlers enable an asymptotic improvement in runtime complexity for a certain class of functions. We consider the generic count problem using a pure PCF-like base language λb\lambda_b and its extension with effect handlers λh\lambda_h. We show that λh\lambda_h admits an asymptotically more efficient implementation of generic count than any λb\lambda_b implementation. We also show that this efficiency gap remains when λb\lambda_b is extended with mutable state. To our knowledge this result is the first of its kind for control operators

    Polish conservative press’ approach to the issue of the borders of the reborn Polish state 1918–1923

    No full text
    Polscy konserwatyści byli tym środowiskiem politycznym, które straciło większość swych wpływów wraz z końcem pierwszej wojny światowej. Pomimo tego ich prasa zachowała duże znaczenie i uczestniczyła w debatach społeczno-politycznych międzywojennej Polski.Celem niniejszej pracy jest przedstawienie stosunku polskiej prasy konserwatywnej do kwestii granic i terytorium odrodzonej Rzeczypospolitej Polskiej. Był to dla niepodległego państwa polskiego jeden z najpoważniejszych problemów, ponieważ polskie aspiracje w tej kwestii zderzyły się z zamiarami państw sąsiednich: Niemiec, Czechosłowacji, „białej” i „czerwonej” Rosji, Litwy, Ukrainy, a nawet Łotwy. Ostateczny kształt terytorium II Rzeczypospolitej miał zostać ustalony przez dyplomatów na konferencji pokojowej w Paryżu, w następstwie plebiscytów, wreszcie także na polach bitew.Pod względem chronologicznym praca obejmuje okres od roku 1918, gdy Polska odzyskała niepodległość, do 1923, gdy granice Rzeczypospolitej zostały ostatecznie uznane przez mocarstwa zachodnie. Dla osiągnięcia zakładanego celu badawczego poddano analizie wszystkie główne konserwatywne tytuły prasowe, ukazujące się we wspomnianym okresie. W rezultacie przeprowadzonych badań przedstawiono programy terytorialne poszczególnych pism oraz ich stosunek względem ostatecznego kształtu granic państwa polskiego.Polish conservatives were a political group, which lost most of its influence with the end of the First World War. Despite of that, their press retained its significance and participated in social and political debates of interwar Poland.The purpose of the submitted thesis is to present the approach of the Polish conservative press to the issue of the borders and territory of the reborn Republic of Poland. It was one of the most serious problems for independent Polish state, because its aspirations in this matter clashed with the plans of neighboring countries: Germany, Czechoslovakia, White and Red Russia, Lithuania, Ukraine and even Latvia. The final shape of the territory of the Second Republic was to be established by diplomats at the peace conference in Paris, as a result of plebiscites, finally also on the battlefields.Chronologically, the study covers the period from the year 1918, when Poland regained its independence, to 1923, when the borders of the Republic were eventually recognized by the Western powers. In order to achieve the assumed research goal, all the major conservative press titles, which appeared in the said period, have been analyzed. As a result of that research, the territorial programs of individual newspapers and their viewpoint on the final shape of the borders of the Polish state have been presented

    Italo-Abyssinian conflict 1934-1936 in the pages of selected polish newspapers

    No full text
    Celem niniejszej pracy było omówienie sposobu relacjonowania konfliktu włosko-abisyńskiego z lat 1934-1936 na łamach wybranych tytułów polskiej prasy. Dotyczy to zarówno skali zainteresowania różnych dzienników „kwestią abisyńską”, jak również ich stanowisk względem całego konfliktu. Zbadane zostało również, czy poszczególne tytuły przedstawiały tę kwestię w sposób obiektywny, czy też stronniczy. W ten sposób w znacznym stopniu możliwe stanie się ukazanie poglądów polskiej opinii publicznej na ten konflikt. Dla realizacji postawionego celu poddano dokładnej analizie grupę polskich dzienników okresu lat 1934-1936, reprezentujących szerokie spektrum poglądów, od środowisk narodowo-radykalnych po socjalistów. W ramach tych badań omawiano stosunek polskiej prasy do kwestii abisyńskiej przed wybuchem wojny, następnie sposób relacjonowania działań wojennych oraz stanowisko poszczególnych pism wobec międzynarodowych reperkusji całego konfliktu.Analiza wybranych tytułów prasowych wykazała, że zainteresowanie konfliktem włosko-abisyńskim było początkowo w Polsce niewielkie. Wzrastało jednak wyraźnie wraz z zaostrzaniem się konfliktu, a po wybuchu wojny w październiku 1935 roku było już znaczne i pozostało na wysokim poziomie aż do końca wojny w maju 1936. Z niewielkimi wyjątkami relacjonowano na bieżąco zarówno działania wojenne, jak również negocjacje dyplomatyczne, toczące się wokół konfliktu. Prasa w Polsce podzieliła się na tle stosunku do kwestii abisyńskiej. Zdecydowanego poparcia Abisynii udzieliły dzienniki lewicowe i centrowe. Natomiast tytuły związane z obozem narodowym oraz prawicowym skrzydłem rządzącego obozu sanacyjnego sympatyzowały z Włochami. Podział nastąpił w środowisku konserwatystów, z których część umiarkowanie popierała stronę włoską, część natomiast opowiedziała się za obroną niepodległości Abisynii. Poszczególne tytuły różniły się jednocześnie skalą zaangażowania po obranej stronie konfliktu – niektóre przedstawiały kwestię abisyńską w sposób skrajnie stronniczy, inne dążyły do zachowania na swych łamach pluralizmu opinii.The purpose of this thesis was to elaborate the manner in which Italo-Abyssinian conflict (1934-1936) was featured in the pages of selected polish newspapers. It demonstrated how much attention Polish press gave to the “Abyssinian question” and what was the position of selected titles in that case.Performed analysis illustrated that at the beginning the conflict attracted only minor attention in Poland. However, that attitude changed when the threat of open war became more serious. Thereafter, Polish newspapers kept high level of attention to the Italo-Abyssinian conflict. The press was divided in its opinion on the “Abyssinian question”. Analysis showed that newspapers with left-wing or centre affiliation supported the african nation, while those related to the nationalist movement or the right wing of the rulling party were symphatetic towards Italians. The conservatives were disunited over that question – some showed support for Abyssinia, while others backed Italy

    Monads for behaviour

    No full text
    The monads used to model effectful computations traditionally concentrate on the \"destination\" - the final results of the program. However, sometimes we are also interested in the \"journey\" - the intermediate course of a computation - especially when reasoning about non-terminating interactive systems. In this article we claim that a necessary property of a monad for it to be able to describe the behaviour of a program is complete iterativity. We show how an ordinary monad can be modified to disclose more about its internal computational behaviour, by applying an associated transformer to a completely iterative monad. To illustrate this, we introduce two new constructions: a coinductive cousin of Cenciarelli and Moggi's generalised resumption transformer, and States - a State-like monad that accumulates the intermediate states

    Les moteurs de l'evolution galactique: recherche de signatures des mecanismes d'evolution

    No full text
    SIGLEAvailable from INIST (FR), Document Supply Service, under shelf-number : TD 20403 / INIST-CNRS - Institut de l'Information Scientifique et TechniqueFRFranc
    corecore